package com.atguigu.spzx.product.client.fallback;

import com.atguigu.spzx.model.entity.product.ProductSku;
import com.atguigu.spzx.model.vo.common.Result;
import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import com.atguigu.spzx.product.client.ProductClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ProductClientFallback implements ProductClient {
    @Override
    public Result updateSkuSalesAndStockByOrderNo(String orderNo) {
        log.error("远程调用更新sku销量库存失败 {} " ,orderNo);
        return Result.setResult(ResultCodeEnum.ERROR , null);
    }

    @Override
    public Result<ProductSku> findSkuById(Long skuId) {
        log.error("远程调用查询id=>{} sku数据失败" ,skuId);
        return Result.setResult(ResultCodeEnum.ERROR , null);
    }
}
